const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    openid: { type: String },
    token: { type: String },
    session_key: { type: String },
    cardata: [{ 
        goods: { type: mongoose.SchemaTypes.ObjectId, ref: 'goodslist' },
        num: String 
    }]
})

module.exports = mongoose.model('admin', schema)